package mta.selector;

import mta.localization.LocalizationPackage;

import java.util.*;

/**
 * Magento Translation Assistant
 * Copyright (c) 2009 Dmitry Nikolaev
 * Contact author: blackliteon@gmail.com
 */
public class UntranslatedSelector implements PhraseSelector {
    private LocalizationPackage lPackage;

    public UntranslatedSelector(LocalizationPackage lPackage) {
        this.lPackage = lPackage;
    }

    public HashMap<String, String> getPhrases() {
        List<String> phrases = new ArrayList<String>(lPackage.getUntranslatedPhrasesIncludePartial());
        Collections.sort(phrases);

        LinkedHashMap<String, String> result = new LinkedHashMap<String, String>();
        for (String phrase : phrases) {
            result.put(phrase, "");
        }
        return result;
    }
}
